﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace politicsWorks.Forms
{
    public partial class FormAddStudent : Form
    {
        public FormAddStudent()
        {
            InitializeComponent();
        }

        public delegate void AddStudentEventHandler(string sname, string sno);

        public event AddStudentEventHandler addStudent;
        private void button1_Click(object sender, EventArgs e)
        {
            string name = textBox1.Text;
            string no = textBox2.Text;
            if (name != "" && no != "")
                addStudent(name, no);
            Close();
        }
    }
}
